<template>
	<div>
		<div class="graybg"></div>
		<div class="header header_bg">
			<div class="header_left">
				<i onclick="javascript:history.back(-1)" class="iconfont baiColor">&#xe612;</i>

			</div>
			<div class="header_center">
				<span class="baiColor">服务中心申请</span>
			</div>
		</div>

		<div class="center" style="padding-top: 45px;">
			<p class="desc">申请服务中心需要满足以下条件</p>
			<div class="require">
			<router-link :to="{name:'renzheng'}">
				<section>
					<p class="pull-left">
						<i class="iconfont">&#xe619;</i>
						<span>实名认证</span>
					</p>
					<p class="pull-right">
						<span class="info1">{{info1}}</span>
					</p>
				</section>
				</router-link>
				<section>
					<p class="pull-left">
						<i class="iconfont">&#xe64a;</i>
						<span>3星以上店主</span>
					</p>
					<p class="pull-right">
						<span class="info2">{{info2}}</span>
					</p>
				</section>
				<section>
					<p class="pull-left">
						<i class="iconfont">&#xe60b;</i>
						<span>150平米以上店铺</span>
					</p>
					<p class="pull-right">
						<span class="info3">{{info3}}</span>
					</p>
				</section>
			</div>
			<div class="fuwu">
				<button @click="next" class="baocun">下一步</button>
			</div>
		</div>

	</div>
</template>

<script>
	export default {
		data() {
			return {
				info1: '',
				info2: '',
				info3: '已满足',
				data:'',
			}
		},
		mounted: function() {
			//获取用户的信息
			var params = new URLSearchParams();
			var info = window.localStorage.data;
//			params.append('token', info);	//客户秘钥（信息）
			this.$axios({
				url:'One/My/myServeC',
				method:"GET",
				params:{
					token:info
				}
			}).then((res) => {
//				console.log(res)
				this.data = res.data.data;
				this.info1 = this.data.real;
				this.info2 = this.data.level;
			}).catch((err) => {
				console.log(err)
			})
		},
		methods: {
			next: function() {
				if(this.data.real == '未审核' || this.data.real == '审核失败'){
					alert('实名认证尚未通过')
				}else if(this.data.level == '未满足'){
					alert('星级店主未满足')
				}else{
					this.$router.push({name: 'fuwuinfo'});
				}
			}
		}
	}
</script>

<style scoped="scoped">
	@import "../css/public.css";

	.center {
		width: 95%;
		margin: 0 auto;
	}
	
	.center .desc {
		color: #666;
		font-size: 14px;
		margin: 8px 0;
	}
	
	.center section {
		color: #333;
		font-size: 15px;
		background: #fff;
		height: 40px;
		border-bottom: solid 0.5px #f0f0f0;
	}
	
	.center section p {
		padding: 8px 0;
	}
	
	.center section p i {
		width: 22px;
		height: 21px;
	}
	
	.center section .pull-left i {
		padding: 0 10px;
		color: #F3961F;
		font-size: 21px;
	}
	
	.center section .pull-right span {
		color: #999;
		padding: 0 10px;
	}
	
	div>.fuwu button {
		display: inline-block;
		background: #F3961F;
		width: 100%;
		height: 44px;
		border-radius: 10px;
		font-size: 18px;
		color: #fff;
		margin-top: 91px;
	}
</style>